#include<bits/stdc++.h>
using namespace std;
int main()
{
	double flag=-1,e,pi=4,k=1000;
	int i=1;
	cin>>e;
	while(4.0/(2*i+1)>=e)
	{
		k=4.0/(2*i+1);
		pi=pi+k*flag;
		flag=-flag;
		i++;
	}
	printf("pi=%.6lf",pi);
    return 0;
}
